#include <stdio.h>
int main()
{
    int i,j;
    int num[4][4];
    printf("Please enter 16 number in the 4x4 matrix, from left to right and up to down.\n");
    for(i=0,j=0;i<=3;j++)
    {
        scanf("%d",&num[i][j]);
        if(j==3)
        {
            j-=4;
            i++;
        }
    }
    printf("This is the matrix.\n");
    for(i=0;i<=3;i++)
    {
        printf("|%3d %3d %3d %3d|\n",num[i][0],num[i][1],num[i][2],num[i][3]);
    }
    printf("And this is the transpose of the matrix.\n");
    for(i=0;i<=3;i++)
    {
        printf("|%3d %3d %3d %3d|\n",num[0][i],num[1][i],num[2][i],num[3][i]);
    }

}